﻿using Microsoft.ExtendedReflection.Utilities;
using System.ComponentModel;

namespace MolesVS2012.Host
{
    public sealed class MolesVsHostExitCodes
    {
        public const int UnexpectedException = -1001;
        public const int RemotingConnectionFailed = -1002;
        [Description("error while parsing options")]
        public const int OptionsParsingError = -1003;
        public const int InitializeTimeOut = -1004;
        public const int AgentProcessExited = -1005;
        public const int RemotingException = -1006;
        [Description("instrumentation not configured properly")]
        public const int InstrumentionDriverConfigurationError = -1014;
        [Description("failed to register or unregister the host type")]
        public const int RegistrationError = -1030;

        private MolesVsHostExitCodes()
        {
        }

        public static string Describe(int exitCode)
        {
            return ExitCodes.DescribeHelper(exitCode, "{0} ({1} - 0x{1:x})", typeof(MolesVsHostExitCodes), typeof(ExitCodes));
        }
    }
}